package com.sy.nlp;

import com.hankcs.hanlp.HanLP;
import com.hankcs.hanlp.seg.Segment;
import com.hankcs.hanlp.seg.common.Term;

import java.util.List;

public class Demo1 {
    public static void main(String[] args) {
        String[] testCase = new String[]{
                "下午和李伟一起去南京苏宁科技有限公司开会",
                "签约仪式前，秦光荣、李纪恒、仇和等一同会见了参加签约上海的企业家。",
                "王国强、高峰、汪洋、张朝阳光着头、韩寒、小四",
                "张浩和胡健康复员回家了",
                "王总和小丽结婚了",
                "编剧邵钧林和稽道青说",
                "这里有关天培的有关事迹",
                "龚学平等领导,邓颖超生前",
        };

        Segment segment = HanLP.newSegment()
                .enableNameRecognize(true)
                .enablePlaceRecognize(true)
                .enableOrganizationRecognize(true);
        for (String sentence : testCase)
        {
            List<Term> termList = segment.seg(sentence);
            System.out.println(termList);
//            List<String> strings = HanLP.extractSummary(sentence, 3);
//            System.out.println(strings);

//            List<String> keywordList = HanLP.extractKeyword(sentence, 5);
//            System.out.println(keywordList);

        }
    }
}
